<form class="form-horizontal well" method="post">
    <fieldset>
        <legend>Asignar cama</legend>
        
        <div class="row-fluid">
            <div class="span2">
                <div class="control-group">
                    <div class="span12"></div>
                </div>
            </div>
            <div class="span6">
                
                <div class="control-group">
                    <label class="control-label">Paciente</label>
                    <div class="controls">
                        <input type="text" class="span12" name="paciente" id="paciente" DISABLED>
                    </div>
                </div>
                
                <div class="control-group">
                    <label align="center"> BÚSQUEDA</label>
                </div>
                
                <div class="control-group">
                    <label class="control-label">Sitio</label>
                    <div class="controls">
                        <input type="text" class="span12" name="nombreSitio" id="nombreSitio">
                    </div>
                </div>
                
                <div class="control-group">
                    <label class="control-label">Ambiente</label>
                    <div class="controls">
                        <?php  echo form_dropdown('ambiente', $combo_ambiente, NULL, 'name=ambiente id=ambiente class="span12 chzn-select" '); ?>
                    </div>
                </div>
                
                <div class="control-group">
                    <label class="control-label">Tipo de sitio</label>
                    <div class="controls">
                        <?php echo form_dropdown('tipoSitio', $combo_tipoSitio, NULL, ' name=tipoSitio id=tipoSitio class="span12 chzn-select" '); ?>
                    </div>
                </div>
                
            </div>
            <div class="span4">
                <div class="control-group">
                    <div class="span12"></div>
                </div>
                <div class="control-group">
                    <div class="span12"></div>
                </div>
                <div class="control-group">
                    <div class="span12"></div>
                </div>
                <div>
                    <button type="submit" class="btn btn-success" onclick="this.form.action='buscarCama'">Buscar</button>
                </div>
            </div>
        </div>
        
        <div class="row-fluid">
            <div class="span1">
            </div>
            <div class="span10">
                <table class="table table-striped table-condensed">
                    <tr>
                        <td>Número</td>
                        <td>Nombre de sitio</td>
                        <td>Ambiente</td>
                        <td>Tipo de sitio</td>
                        <td>Check</td>
                    </tr>
                
                
                <?php 
                    $i=1;
                    if(isset($arr_busqueda)) {
                        foreach ($arr_busqueda as $actual) {
                ?>
                            <tr>
                                <td><?php echo $i ?></td>
                                <td><?php echo $actual["NombreSitio"]; ?></td>
                                <td><?php echo $actual["Ambiente"] ?></td>
                                
                                <td><label name="sitio"><?php echo $actual["TipoSitio"]; ?></label></td>
                                
                                <td><?php echo $actual["TipoSitio"] ?></td>
                                <td><input type="radio" name="emergencia<?php $i ?>" id="emergencia<?php $i ?>"></td>
                            </tr>
                <?php           
                            $i++;         
                        }
                    }
                ?>
                    
                </table>
            </div>
            <div class="span1">
            </div>
        </div>
        
        <div class="form-actions">
            <button type="submit" class="btn btn-primary" onclick="this.form.action='asignarCama'">Asignar</button>
            <button type="reset" class="btn">Cancelar</button>
        </div>
        
    </fieldset>
</form>